<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<a href="index.jsp">首页</a><br />
	<a href="init_save">添加新纪录</a><br />
	<table>
		<tr>
			<td>
			<a href="bookstore?tid=0&cid=0&sid=0&wid=0&uid=0">全部</a>
			</td>
			<c:forEach items="${datas.types }" var="type">
				<td>
				<a href="bookstore?tid=${type.id }&cid=0&sid=0&wid=0&uid=0">${type.name }</a>
				</td>
			</c:forEach>
		</tr>
		<tr>
			<td>
			<a href="bookstore?tid=${datas.type_id }&cid=0&sid=${datas.state_id }&wid=${datas.wordCount_id }&uid=${datas.updateTime_id }">不限</a>
			</td>
			<c:forEach items="${datas.classifys }" var="classify">
				<td>
				<a href="bookstore?tid=${datas.type_id }&cid=${classify.id }&sid=${datas.state_id }&wid=${datas.wordCount_id }&uid=${datas.updateTime_id }">${classify.name }</a>
				</td>
			</c:forEach>
		</tr>
		<tr>
			<td>
			<a href="bookstore?tid=${datas.type_id }&cid=${datas.classify_id }&sid=0&wid=${datas.wordCount_id }&uid=${datas.updateTime_id }">不限</a>
			</td>
			<c:forEach items="${datas.states }" var="state">
				<td>
				<a href="bookstore?tid=${datas.type_id }&cid=${datas.classify_id }&sid=${state.id }&wid=${datas.wordCount_id }&uid=${datas.updateTime_id }">${state.name }</a>
				</td>
			</c:forEach>
		</tr>
		<tr>
			<td>
			<a href="bookstore?tid=0&cid=0&sid=0&wid=0&uid=0">不限</a>
			</td>
			<c:forEach items="${datas.wordCounts }" var="wordCount">
				<td>
				<a href="bookstore?tid=${datas.type_id }&cid=${datas.classify_id }&sid=${datas.state_id }&wid=${wordCount.id }&uid=${datas.updateTime_id }">${wordCount.name }</a>
				</td>
			</c:forEach>
		</tr>
		<tr>
			<td>
			<a href="bookstore?tid=0&cid=0&sid=0&wid=0&uid=0">不限</a>
			</td>
			<c:forEach items="${datas.updateTimes }" var="updateTime">
				<td>
				<a href="bookstore?tid=${datas.type_id }&cid=${datas.classify_id }&sid=${datas.state_id }&wid=${datas.wordCount_id }&uid=${updateTime.id }">${updateTime.name }</a>
				</td>
			</c:forEach>
		</tr>
	</table>
	<table>
		<tr>
			<th>书籍编号</th>
			<th>书籍名称</th>
			<th>作者昵称</th>
			<th>书籍类型</th>
			<th>书籍图片</th>
			<th>书籍简介</th>
			<th>修改</th>
			<th>删除</th>
		</tr>
		<c:forEach items="${datas.bookList }" var="book">
			<tr>
				<td>${book.bid }</td>
				<td>${book.bname }</td>
				<td>${book.aname }</td>
				<td>${book.type }</td>
				<td><img alt="jpg" src="http://192.168.10.160${book.bimg }"></td>
				<td style="width:300px">${book.bdesc }</td>
				<td><a href="book_single?book_id=${book.bid }">修改</a></td>
				<td><a href="book_delete?book_id=${book.bid }">删除</a></td>
			</tr>
		</c:forEach>
	</table>
	<a href="bookstore?page=1&tid=${datas.type_id }&cid=${datas.classify_id }&sid=${datas.state_id }&wid=${datas.wordCount_id }&uid=${datas.updateTime_id }">首页</a>
	<a href="bookstore?page=${datas.prev }&tid=${datas.type_id }&cid=${datas.classify_id }&sid=${datas.state_id }&wid=${datas.wordCount_id }&uid=${datas.updateTime_id }">上一页</a>
	<a href="bookstore?page=${datas.next }&tid=${datas.type_id }&cid=${datas.classify_id }&sid=${datas.state_id }&wid=${datas.wordCount_id }&uid=${datas.updateTime_id }">下一页</a>
	<a href="bookstore?page=${datas.total }&tid=${datas.type_id }&cid=${datas.classify_id }&sid=${datas.state_id }&wid=${datas.wordCount_id }&uid=${datas.updateTime_id }">尾页</a>
</body>
</html>